package com.patternsbox.creational.singleton;

import com.patternsbox.ActionTemplate;

public class SingletonAction extends ActionTemplate {

	@Override
	protected void doAction() {
		// Constructor is protected -- cannot use new
		Singleton s1 = Singleton.getInstance();
		Singleton s2 = Singleton.getInstance();
		// Test for same instance
		if (s1 == s2) {
			System.out.println("Objects are the same instance");
		}
	}

}
